import { User } from "@/api/octp/models/user";
import { dateFormat } from "@/utils/date";

function EmptyRender() {
  return <span> - - </span>;
}

export function DateRender(date: string) {
  return <span>{dateFormat(date)}</span>;
}

export function UserRender(user: User | null) {
  if (!user) return EmptyRender();
  return (
    <span>
      {user.name} ({user.num})
    </span>
  );
}
